{{include file="header.tpl"}}
<!--content-->
<div class="adbox">
    <div class="w1002 login-box">

        {{if !$user.USERNAME}}
        <div class="login">
        </div>
         <form id="form1" name="form1" method="post" action="index.php?{{$TIN_CTL}}=user&{{$TIN_ACT}}=ChkLogin">
        <table width="310" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td align="center" valign="middle" class="adbox_td01">欢迎登录农易贷理财！</td>
            </tr>
        <tr>
            <td height="48"><input name="username" type="text" id="username" placeholder="请输入用户名" class="adbox_text" /></td>
            </tr>
        <tr>
            <td height="48"><input name="password" type="password" id="password" placeholder="请输入密码"  class="adbox_text" /></td>
            </tr>
        <tr>
            <td height="48"><input name="checkCode" type="text" id="checkCode" placeholder="请输入验证码" class="adbox_text" style="width:115px;" /><img id="chkcode" src="res/vcode.php" style="cursor:pointer" width="60" height="25"></td>
            </tr>
        <tr>
            <td width="140" height="48" valign="middle" class="adbox_td02"><input name="" type="image" id="btnlogin"  src="res/images/text_btn.jpg" class="adbox_image" /><a href="#">忘记密码？</a></td>
        </tr>
        <tr>
        <td height="36" class="adbox_td03"><a href="index.php?ctl=user&act=reg">还不是会员？</a></td>
            </tr>
        </table>
        </form>
        {{else}}
        <div class="login">
        </div>
         <table width="310" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td align="center" valign="middle" class="adbox_td01">欢迎使用农易贷理财！</td>
            </tr>
        <tr>
            <td height="48">您当前使用的农易贷账户是：</td>
            </tr>
          <tr>
            <td height="48">{{$user.USERNAME}}</td>
            </tr>
        <tr>
           <td height="48"><input name="" type="image" id="btnlogin"  src="res/images/text_btn.jpg" class="adbox_image" /></td>
        </tr>
        </table>
       {{/if}}
    <script type="text/javascript">
    $(function(){
       $('#btnlogin').click(function(){
            if($('#username').val()!="" && $('#password').val()!=""){
                $.jBox.tip('正在验证...','loading');
                $('#form1').submit();   
            }else{
                $.jBox.tip('请填写用户名或密码','登录');
            }
            return false;
        })
        $('#chkcode').click(function(){
            $(this).attr("src","res/vcode.php?rnd="+Math.random());
        });
    });
    </script>
    </div>
</div>


<div class="w1002 index_con01">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td width="33%" class="index_wylc">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="40%" height="94" align="right"><img src="res/images/index_wylc.png"  /></td>
                    <td width="60%" align="left" valign="top" class="index_wylc_td"><a href="index.php?ctl=deal">我要理财</a><p>年化利率10%+</p><p>专业风控，本息保障</p></td>
                </tr>
            </table>
        </td>
        <td width="33%" class="index_wylc"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="40%" height="94" align="right"><img src="res/images/index_wyjk.png"  /></td>
                    <td width="60%" align="left" valign="top" class="index_wylc_td"><a href="index.php?ctl=borrow">我要借款</a>
                        <p>无抵押无担保，信用借款</p><p>月入4000，最高可申50万</p></td>
                </tr>
            </table>
        </td>
        <td width="33%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="40%" height="94" align="right"><img src="res/images/index_zjaq.png" /></td>
                    <td width="60%" align="left" valign="top" class="index_wylc_td"><a href="#">资金安全</a>
                        <p>第三方支付平台</p><p>资金完全监管</p></td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</div>


<div class="w1002 Mar10 index_con02">
    <div class="Fl index_c2_lelt">
        <ul class="index_c2_left01">
            <li><div class="index_c2_tb01">
             <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="46" align="center" valign="middle" class="index_c2_td01">非凡资产管理双月增值产品</td>
            </tr>
            <tr>
                <td valign="top"  class="index_c2_td02"><p>预期年化收益率 9%</p><p> 2000.00元 起12个月</p><p>  一次性还本利息</p></td>
            </tr>
            <tr>
                <td height="55" class="index_c2_td03"><a href="#">正在热销</a></td>
            </tr>
             </table>
            </div></li>
            
            <li><div class="index_c2_tb01">
             <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="46" align="center" valign="middle" class="index_c2_td01">非凡资产管理双月增值产品</td>
            </tr>
            <tr>
                <td valign="top"  class="index_c2_td02"><p>预期年化收益率 9%</p><p> 2000.00元 起12个月</p><p>  一次性还本利息</p></td>
            </tr>
            <tr>
                <td height="55" class="index_c2_td03"><a href="#">正在热销</a></td>
            </tr>
             </table>
            </div></li>
            
            <li style="width:253px"><div class="index_c2_tb01">
             <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="46" align="center" valign="middle" class="index_c2_td01">非凡资产管理双月增值产品</td>
            </tr>
            <tr>
                <td valign="top"  class="index_c2_td02"><p>预期年化收益率 9%</p><p> 2000.00元 起12个月</p><p>  一次性还本利息</p></td>
            </tr>
            <tr>
                <td height="55" class="index_c2_td03"><a href="#">正在热销</a></td>
            </tr>
             </table>
            </div></li>
        </ul>
        <div class="index_c2_xmmc01"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="index_xmmc_tbl">
             <tr>
                <th width="14%" height="40">项目名称</th>
                <th width="16%">项目编号</th>
                <th width="14%">项目金额</th>
                <th width="17%">年化收利率</th>
                <th width="8%">投资期限</th>
                <th width="15%">进度</th>
                <th width="16%">状态/操作</th>
            </tr>
            {{foreach from=$loanlist item=item key=key}}
                <tr>
                <td><a href="index.php?ctl=deal&act=bid&id={{$item.ID}}">{{$item.TITLE}}</a></td>
                  <td>{{$item.CODE}}</td>
                  <td>{{$item.PRICE}}元 </td>
                  <td>14%</td>
                  <td> {{$item.REPAY_TIME}}个月</td>
<!--                  <td>           
                      {{if $item.loading == 100 || $item.stime < 0 || $item.deal_stat ==3 || $item.deal_stat ==4}}
                      投标结束
                      {{else}}
                      <p id="time_{{$key}}"></p><div style="DISPLAY: none" id="sec_left_{{$key}}" class="time_left">{{$item.stime}}{{$key}}</div>
                      {{/if}}
                  </td>-->
                  <td><div class="progressbar progressbar-{{$item.loading}}"><span>{{$item.loading}}</span>%</div></td>
                  <td>{{if $item.loading == 100 || $item.stime < 0 || $item.deal_stat ==3 || $item.deal_stat ==4}}
                       <span class="index_invest_btn">投标结束</span>
                      {{else}}
                       <a href="index.php?ctl=deal&act=bid&id={{$item.ID}}"><span class="index_invest_btn">投资</span></a>
                      {{/if}}
                  </td>
                </tr>
            {{foreachelse}}
             <tr>
                 <td colspan="7">当前无相关项目</td>
            </tr>
            {{/foreach}}
        </table>
        </div>
    </div>
    <div class="Fr index_c2_right">
        <div class="index_Notice">
            <div class="index_Nt01">
                <i class="Fl">农易贷<font color="#ff7200">公告</font></i>
                <em class="Fr"><a href="index.php?ctl=article&id=1"><img src="res/images/index_more.jpg" /></a></em>
                <br class="Spacer1" />
            </div>
            <ul>
           {{foreach from=$newlist.data item=item}}
                <li>·<a href="index.php?ctl=article&act=show&id={{$item.ID}}">{{$item.TITLE}}</a></li>
            {{/foreach}}
            </ul>
        </div>
        <div class="Mar14"><img src="res/images/index_img01.jpg"  width="234" height="110"/></div>
        <div class="Mar14"><a href="index.php?ctl=index&act=calculator"><img src="res/images/index_img02.jpg"  width="234" height="112"/></a></div>
    </div>
    <br class="Spacer1" />
</div>
<div class="w1002 Mar14"><img src="res/images/index_Member.jpg"  width="1002" height="75"/></div>
<div class="w1002 Mar14 index_con03">
    <div class="Fl index_Novc">
        <div class="index_Novc_top"><i class="Fl">新手指引</i><em class="Fr"><a href="index.php?ctl=article&id=20"><img src="res/images/index_more.jpg" /></a></em><br class="Spacer1" /></div>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="index_Novc_tble">
            <tr>
                <td height="82" width="120" align="center"><img src="res/images/index_Novc01.jpg" /></td>
                <td><a href="#">投资理财第一步</a><p>免费注册会员，开通第三方资金托管，充值理财资金</p></td>
            </tr>
            <tr>
                <td height="82" align="center"><img src="res/images/index_Novc02.jpg" /></td>
                <td><a href="#">投资理财第二步</a><p>选定投资理财项目，投标成功后财富马上增值</p></td>
            </tr>
            <tr>
                <td height="82" align="center"><img src="res/images/index_Novc03.jpg" /></td>
                <td><a href="#">投资理财第三步</a><p>按月坐收投资收益，继续投资或提现到银行卡</p></td>
            </tr>
        </table>
    </div>  
    
    <div class="Fl index_Novc  Mar_lft20">
        <div class="index_Novc_top"><i class="Fl">常见问题</i><em class="Fr"><a href="index.php?ctl=article&id=7"><img src="res/images/index_more.jpg" /></a></em><br class="Spacer1" /></div>
       <ul class="index_Novc_ul">
           {{foreach from=$helplist.data item=item}}
                <li>·<a href="index.php?ctl=article&act=show&id={{$item.ID}}">{{$item.TITLE}}</a></li>
            {{/foreach}}
       </ul>
    </div> 
    
    <div class="Fr index_Novc ">
        <div class="index_Novc_top"><i class="Fl">问答求助</i><em class="Fr"><a href="index.php?ctl=article&id=15"><img src="res/images/index_more.jpg" /></a></em><br class="Spacer1" /></div>
       <ul class="index_Novc_ul">
           {{foreach from=$asklist.data item=item}}
                <li>·<a href="index.php?ctl=article&act=show&id={{$item.ID}}">{{$item.TITLE}}</a></li>
            {{/foreach}}
       </ul>
    </div> 
    <br class="Spacer1" />
</div>
{{include file="footer.tpl"}}
<link rel="stylesheet" type="text/css" href="res/css/progressbar.css">
<script type="text/javascript">
$(function() {
    $('.progressbar').each(function(index, el) {
        var num = $(this).find('span').text();
        $(this).addClass('progressbar-' + num);
    });
});
</script>
<script type="text/javascript">
      var second =null; 
      var minite = null; 
      var hour = null; 
      var day = null; 
      var seconds = null;
      var sec = {};
      function getInitTime(){
          $('.time_left').each(function(){
             var jobj = $(this);
             var SysSecond = parseInt(jobj.text());
             var theid = parseInt((jobj.attr('id')).replace(/sec_left_/,''));
             sec[theid]= SysSecond;
          });
      }
      getInitTime();
      function SetRemainTime() {
            for(var i in sec){
                setRemainTimeSite(i,sec[i]);
            }
       }
      function setRemainTimeSite(theid,SysSs){
          seconds = SysSs/10;
          second = Math.floor(seconds % 60).toString();
          minite = Math.floor((seconds / 60) % 60).toString();
          hour = Math.floor((seconds / 3600) % 24).toString();
          day = Math.floor((seconds / 3600) / 24).toString();
          if (SysSs >= 0) {
               var ss = Math.floor(SysSs % 10).toString();
               if(SysSs % 10==0){
                  seconds = SysSs/10;
                  second = Math.floor(seconds % 60).toString();
                  minite = Math.floor((seconds / 60) % 60).toString();
                  hour = Math.floor((seconds / 3600) % 24).toString();
                  day = Math.floor((seconds / 3600) / 24).toString();
               }
               $("#time_"+theid).html(day + "天" + hour + "小时" + minite + "分" + second + "秒."+ss);
               sec[theid]--;
               SysSs--;
          }else{
            return;
          }
        }
      window.setInterval(SetRemainTime,100);
</script>